// ****************************************************************************** 
// Copyright     :  Copyright (C) 2018, Hisilicon Technologies Co. Ltd.
// File name     :  pmv_c_union_define.h
// Project line  :  K3
// Department    :  K3
// Author        :  Huawei
// Version       :  V100
// Date          :  2015/4/10
// Description   :  HiVcodecV100 VDEC
// Others        :  Generated automatically by nManager V4.2 
// History       :  Huawei 2018/04/10 10:02:40 Create file
// ******************************************************************************

#ifndef __PMV_C_UNION_DEFINE_H__
#define __PMV_C_UNION_DEFINE_H__

/* Define the union U_PMV_STATE0_0 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_0       : 6  ; /* [31:26] */
        unsigned int    dpi2pmv_mby : 10  ; /* [25:16] */
        unsigned int    rsv_1       : 6  ; /* [15:10] */
        unsigned int    dpi2pmv_mbx : 10  ; /* [9:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PMV_STATE0_0;

/* Define the union U_PMV_STATE1_1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_2           : 6  ; /* [31:26] */
        unsigned int    ctrl2cfg_pu_mbx : 10  ; /* [25:16] */
        unsigned int    rsv_3           : 6  ; /* [15:10] */
        unsigned int    ctrl2cfg_pu_mby : 10  ; /* [9:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PMV_STATE1_1;

/* Define the union U_PMV_CYCLE_CNT */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pmv_cycle_cnt : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PMV_CYCLE_CNT;

/* Define the union U_PMV_STATE_3 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_4           : 5  ; /* [31:27] */
        unsigned int    ctrl2cfg_pu_st  : 3  ; /* [26:24] */
        unsigned int    rsv_5           : 4  ; /* [23:20] */
        unsigned int    ctrl2cfg_tu_st  : 4  ; /* [19:16] */
        unsigned int    rsv_6           : 6  ; /* [15:10] */
        unsigned int    ctrl2cfg_cu_st  : 2  ; /* [9:8] */
        unsigned int    rsv_7           : 5  ; /* [7:3] */
        unsigned int    ctrl2cfg_ctb_st : 3  ; /* [2:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PMV_STATE_3;

/* Define the union U_INTRA_PRED_MODE_ERROR_0 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    ipmd_err0 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_INTRA_PRED_MODE_ERROR_0;

/* Define the union U_INTRA_PRED_MODE_ERROR_1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    ipmd_err1 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_INTRA_PRED_MODE_ERROR_1;

/* Define the union U_INTRA_PRED_MODE_ERROR_2 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    ipmd_err2 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_INTRA_PRED_MODE_ERROR_2;

/* Define the union U_INTRA_PRED_MODE_ERROR_3 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    ipmd_err3 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_INTRA_PRED_MODE_ERROR_3;

/* Define the union U_INTRA_PRED_MODE_ERROR_4 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    ipmd_err4 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_INTRA_PRED_MODE_ERROR_4;

/* Define the union U_INTRA_PRED_MODE_ERROR_5 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    ipmd_err5 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_INTRA_PRED_MODE_ERROR_5;

/* Define the union U_INTRA_PRED_MODE_ERROR_6 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    ipmd_err6 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_INTRA_PRED_MODE_ERROR_6;

/* Define the union U_INTRA_PRED_MODE_ERROR_7 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    ipmd_err7 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_INTRA_PRED_MODE_ERROR_7;

/* Define the union U_MV_MAX_MIN */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    mv_max_min : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_MV_MAX_MIN;

/* Define the union U_MV_SUM */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    mv_sum : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_MV_SUM;

/* Define the union U_MV_CNT */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    mv_cnt : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_MV_CNT;


//==============================================================================
/* Define the global struct */
typedef struct
{
    volatile U_PMV_STATE0_0            PMV_STATE0_0            ; /* 0 */
    volatile U_PMV_STATE1_1            PMV_STATE1_1            ; /* 4 */
    volatile U_PMV_CYCLE_CNT           PMV_CYCLE_CNT           ; /* 8 */
    volatile U_PMV_STATE_3             PMV_STATE_3             ; /* C */
    volatile U_INTRA_PRED_MODE_ERROR_0 INTRA_PRED_MODE_ERROR_0 ; /* 10 */
    volatile U_INTRA_PRED_MODE_ERROR_1 INTRA_PRED_MODE_ERROR_1 ; /* 14 */
    volatile U_INTRA_PRED_MODE_ERROR_2 INTRA_PRED_MODE_ERROR_2 ; /* 18 */
    volatile U_INTRA_PRED_MODE_ERROR_3 INTRA_PRED_MODE_ERROR_3 ; /* 1C */
    volatile U_INTRA_PRED_MODE_ERROR_4 INTRA_PRED_MODE_ERROR_4 ; /* 20 */
    volatile U_INTRA_PRED_MODE_ERROR_5 INTRA_PRED_MODE_ERROR_5 ; /* 24 */
    volatile U_INTRA_PRED_MODE_ERROR_6 INTRA_PRED_MODE_ERROR_6 ; /* 28 */
    volatile U_INTRA_PRED_MODE_ERROR_7 INTRA_PRED_MODE_ERROR_7 ; /* 2C */
    volatile U_MV_MAX_MIN              MV_MAX_MIN              ; /* 30 */
    volatile U_MV_SUM                  MV_SUM                  ; /* 34 */
    volatile U_MV_CNT                  MV_CNT                  ; /* 38 */

} S_pmv_REGS_TYPE;

/* Declare the struct pointor of the module pmv */
extern volatile S_pmv_REGS_TYPE *goppmvAllReg;

/* Declare the functions that set the member value */
int iSetPMV_STATE0_0_dpi2pmv_mby(unsigned int udpi2pmv_mby);
int iSetPMV_STATE0_0_dpi2pmv_mbx(unsigned int udpi2pmv_mbx);
int iSetPMV_STATE1_1_ctrl2cfg_pu_mbx(unsigned int uctrl2cfg_pu_mbx);
int iSetPMV_STATE1_1_ctrl2cfg_pu_mby(unsigned int uctrl2cfg_pu_mby);
int iSetPMV_CYCLE_CNT_pmv_cycle_cnt(unsigned int upmv_cycle_cnt);
int iSetPMV_STATE_3_ctrl2cfg_pu_st(unsigned int uctrl2cfg_pu_st);
int iSetPMV_STATE_3_ctrl2cfg_tu_st(unsigned int uctrl2cfg_tu_st);
int iSetPMV_STATE_3_ctrl2cfg_cu_st(unsigned int uctrl2cfg_cu_st);
int iSetPMV_STATE_3_ctrl2cfg_ctb_st(unsigned int uctrl2cfg_ctb_st);
int iSetINTRA_PRED_MODE_ERROR_0_ipmd_err0(unsigned int uipmd_err0);
int iSetINTRA_PRED_MODE_ERROR_1_ipmd_err1(unsigned int uipmd_err1);
int iSetINTRA_PRED_MODE_ERROR_2_ipmd_err2(unsigned int uipmd_err2);
int iSetINTRA_PRED_MODE_ERROR_3_ipmd_err3(unsigned int uipmd_err3);
int iSetINTRA_PRED_MODE_ERROR_4_ipmd_err4(unsigned int uipmd_err4);
int iSetINTRA_PRED_MODE_ERROR_5_ipmd_err5(unsigned int uipmd_err5);
int iSetINTRA_PRED_MODE_ERROR_6_ipmd_err6(unsigned int uipmd_err6);
int iSetINTRA_PRED_MODE_ERROR_7_ipmd_err7(unsigned int uipmd_err7);
int iSetMV_MAX_MIN_mv_max_min(unsigned int umv_max_min);
int iSetMV_SUM_mv_sum(unsigned int umv_sum);
int iSetMV_CNT_mv_cnt(unsigned int umv_cnt);

#endif // __PMV_C_UNION_DEFINE_H__
